<!-- include tpl=head_lay nopadding=true -->
<script type="text/javascript">
function select_input(val)
{
	var opener = $.dialog.opener;
	var url = get_url('open','content','fid={$id}&id='+val);
	$.phpok.json(url,function(rs){
		if(!rs.status){
			$.dialog.tips(rs.info);
			return false;
		}
		for(var i in rs.info){
			if(rs.info[i].type == 'select_more'){
				opener.$.phpok_form_select.change(rs.info[i].gid,i,rs.info[i].value,rs.info[i].gtype);
			}else if(rs.info[i].type == 'radio'){
				opener.$("input[name="+i+"][value="+rs.info[i].value+"]").attr("checked",true);
			}else{
				opener.$("input[name="+i+"]").val(rs.info[i].value);
			}
		}
		$.dialog.close();
	});
}
</script>
<div class="layui-card">
	<div class="layui-card-header">
		<form method="post" class="layui-form" action="{$formurl}" id="post_save">
		<ul class="layout" style="padding-top:2px;">
			<li><input type="text" name="keywords" id="keywords" value="{$keywords}" placeholder="输入搜索关键字" class="layui-input" /></li>
			<li><div style="padding-top:4px;"><input type="submit" value="搜索" class="layui-btn layui-btn-sm" /></div></li>
		</ul>
		</form>
	</div>
	<div class="layui-card-body">
		<table class="layui-table">
		<thead>
		<tr>
			<th>ID</th>
			<!-- loop from=$showlist key=$key value=$value id=$tmpid -->
			<th>{$value}</th>
			<!-- /loop -->
			<th></th>
		</tr>
		</thead>
		<!-- loop from=$rslist key=$key value=$value id=$tmpid -->
		<tr>
			<td>{$value.id}</td>
			<!-- loop from=$showlist key=$k value=$v id=$idxx -->
			<td>
				<!-- if $value[$k] && is_array($value[$k]) -->
				{func current $value[$k]}
				<!-- else -->
				{$value[$k]}
				<!-- /if -->
			</td>
			<!-- /loop -->
			<td><input type="button" value="{lang确认}" onclick="select_input('{$value.id}')" class="layui-btn layui-btn-sm" /></td>
		</tr>
		<!-- /loop -->
		</table>
		<!-- include tpl=pagelist -->
	</div>
</div>

<!-- include tpl=foot_lay is_open=true -->